package monsmon.util.getopt;


/*
 * This is the class that represents a long option with optional 
 *  args.
 * This is to be created by clients and passed to Getopt, where it is 
 *  used in the parsing of command line arguments.
 *
 * By using has_arg, clients can provide wheither or not the option is 
 *  to be followed by optional parameters
 *
 * val is the value returned by Getopt.getopt that declares what the 
 *  arg was
 *
 * Example use
 * 	NO_ARG:	
 * 		Client: LongOpt("some-long-argument", NO_ARG, 52)	
 * 		Command Line: --some-long-argument
 * 	OPT_ARG:
 * 		Client: LongOpt("optional-param", OPT_ARG, 53)
 * 		Command Line: --optional-param
 * 			  or: --optional-param use_foo
 *	REQ_ARG:
 *		Client LongOpt("need-arg", REQ_ARG, 54)
 *		Command Line: --need-arg has_bar
 *
 */
public class LongOpt{

	public static final byte
		NO_ARG		=	0x00,
		OPT_ARG		=	0x02,
		REQ_ARG		=	0x04;

	final String name;
	final byte has_arg;
	final int val;

	public LongOpt(String name, byte has_arg, int val){
		this.name = name;
		this.has_arg = has_arg;
		this.val = val;
	}

}
